//package com.letoken.platform.job.controller;
//
//import com.letoken.platform.job.jobhandler.monitor.WithdrawFailAlert;
//import com.letoken.platform.pub.res.ApiResponse;
//import com.letoken.platform.pub.res.web3.ResultTransaction;
//import com.letoken.platform.repo.admin.req.user.QueryAppUserListReq;
//import com.letoken.platform.repo.web3.EvmProvider;
//import com.letoken.platform.repo.web3.provider.IEvmProvider;
//import com.letoken.platform.repo.web3.util.EvmScanUtil;
//import com.letoken.platform.repo.web3.util.EvmUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * @author letokenlabs
// * @date 2022/12/10$
// */
//@RestController
//@RequestMapping("/evmutil")
//@Api(tags = "Test EvmUtil")
//public class TestEvmUtilController {
//
//    @Autowired
//    WithdrawFailAlert withdrawFailAlert;
//
//    @GetMapping("/blockHeight")
//    @ApiOperation(value = "blockHeight")
//    public ApiResponse blockHeight(@RequestParam(name = "netType", defaultValue = "bsc") String netType) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.blockHeight(evm.getWeb3j()));
//    }
//
//    @GetMapping("/gasPrice")
//    @ApiOperation(value = "gasPrice")
//    public ApiResponse gasPrice(@RequestParam(name = "netType", defaultValue = "bsc") String netType) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.getGasPrice(evm.getWeb3j()));
//    }
//
//    @GetMapping("/balance")
//    @ApiOperation(value = "balance", notes = "evm")
//    public ApiResponse balance_evm(@RequestParam(name = "netType",defaultValue = "bsc") String netType,
//                                   @RequestParam(name = "address") String address) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.getBalance(address, evm.getWeb3j()));
//    }
//
//    @GetMapping("/tokenBalance")
//    @ApiOperation(value = "tokenBalance", notes = "tokenBalance")
//    public ApiResponse tokenBalance(@RequestParam(name = "netType", defaultValue = "bsc") String netType,
//                                    @RequestParam(name = "token") String token,
//                                   @RequestParam(name = "address") String address) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.getTokenBalance(token, address, evm.getWeb3j()));
//    }
//
//    @GetMapping("/getTxReceiptstatus")
//    @ApiOperation(value = "getTxReceiptstatus", notes = "getTxReceiptstatus")
//    public ApiResponse getTxReceiptstatus(@RequestParam(name = "netType", defaultValue = "bsc") String netType,
//                                    @RequestParam(name = "txHash") String txHash) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(EvmUtil.getTxReceiptstatus(txHash, evm.getWeb3j()));
//    }
//}